package fractal.view;

import fractal.action.AppAction;
import java.awt.event.ActionListener;
import javax.swing.JButton;

/** Class extends JButton */
public class ClickButton extends JButton {

	/** constructor argument: item name, action name */
	public ClickButton(String itemName, String actionName) {
		super(itemName);
		super.addActionListener(new AppAction(actionName));
	}

	/** constructor argument: item name, action name, application view */
	public ClickButton(String itemName, String actionName, AppView appView) {
		super(itemName);
		super.addActionListener(new AppAction(actionName, appView));
	}

	/** constructor argument: item name, action name listener */
	public ClickButton(String itemName, ActionListener actionListener) {
		super(itemName);
		super.addActionListener(actionListener);
	}
}
